import request from "../utils/request"

// 新增商品
const addGoods = (data) => {
    return request({url:'/supp;ier', method:'POST', data})
}

// 获取商品数据列表
const getGoodsList = (currentPage = 1,pageSize = 3,data = {}) => { 
    return request({url: `/goods/list/search/${currentPage}/${pageSize}`,method:'POST',data})
}
// 编辑商品接口
const editGoods = (id, data) => { 
    return request({url: `/goods/${id}`,method:'POST',data})
}
// 查询单个商品数据接口
const findGoods = (id) => {
    return request({url:`/goods/${id}`, method:'GET'})
}
// 删除商品接口
const deleteGoods = (id) => {
    return request({url:`/goods/${id}`,method:'DELETE'})
}
export default {
    addGoods,
    getGoodsList,
    editGoods,
    findGoods,
    deleteGoods
}
